package com.aspose.cells;

class zanu {
   private GradientFill c;
   boolean a;
   byte[] b;

   zanu(GradientFill var1) {
      this.c = var1;
      GradientStopCollection var2 = var1.getGradientStops();
      Workbook var3 = var1.e;
      switch(var1.getGradientStops().getCount()) {
      case 2:
         this.a = true;
         break;
      case 3:
         if (var2.get(0).a.c(var3) == var2.get(2).a.c(var3)) {
            this.a = true;
         }
         break;
      default:
         this.b = zvj.a(var2);
      }

   }

   int a() {
      if (this.c.b instanceof zacn) {
         zacn var2 = (zacn)this.c.b;
         return var2.b ? 7 : 4;
      } else if (this.c.b instanceof zaco) {
         zaco var1 = (zaco)this.c.b;
         return var1.b == var1.e && var1.c == var1.d && var1.b == zml.k / 2 && var1.c == zml.k / 2 ? 6 : 5;
      } else {
         return 100;
      }
   }

   double[] b() {
      double[] var1 = new double[4];
      if (this.c.b instanceof zaco) {
         zaco var2 = (zaco)this.c.b;
         var1[0] = (double)var2.b / (double)zml.k;
         var1[1] = (double)var2.c / (double)zml.k;
         var1[2] = 1.0D - (double)var2.e / (double)zml.k;
         var1[3] = 1.0D - (double)var2.d / (double)zml.k;
      }

      return var1;
   }

   double c() {
      if (this.c.b != null && this.c.b instanceof zacn) {
         double var1 = (double)this.c.getAngle();
         var1 = 90.0D - var1;
         if (var1 < 0.0D) {
            var1 += 360.0D;
         }

         return var1;
      } else {
         return 0.0D;
      }
   }

   int d() {
      if (this.a) {
         return this.c.getGradientStops().getCount() == 3 ? (int)this.c.getGradientStops().get(1).getPosition() : 100;
      } else {
         return 100;
      }
   }

   GradientStop e() {
      return this.c.getGradientStops().get(0);
   }

   GradientStop f() {
      return this.c.getGradientStops().getCount() == 3 && this.a ? this.c.getGradientStops().get(1) : this.c.getGradientStops().get(this.c.getGradientStops().getCount() - 1);
   }
}
